<template>
	<view class="bondlist">
		<diyNavBar value='保证金记录' color='#FF6F30'></diyNavBar>
		<view class="item" v-for="(item,index) in getData" :key="index">
			<view class="left">
				<text class="name">{{item.status==1 ? '保证金退还余额' : '任务赏金退还到保证金'}}</text>
				<text class="price">{{item.bzjprice}}</text>
			</view>
			<text class="time">{{item.create_time}}</text>
		</view>
	</view>
</template>

<script>
	import diyNavBar from '../../component/diy-nav/diy-navbar.vue'
	import loadingCover from '../../component/loading-cover/loading-cover.vue'
	export default{
		components:{diyNavBar,loadingCover},
		data(){
			return {
				getData:null
			}
		},
		onShow(){
			this.getdata()
		},
		methods:{
			getdata(){
				this.$http.sendrequest('/member/memberBzj',{},{
					tokenJudge:true
				}).then(res=>{
					if(res.code == 1){
						this.getData = res.data;
						if(this.$refs.loadingCover) this.$refs.loadingCover.hide();
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bondlist{
		width: 100%;
		min-height: 100vh;
		background: $uni-content-background-color;
		.item{
			margin: 30rpx;
			background: #fff;
			padding: 20rpx 30rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			border-radius: 10rpx;
			box-shadow: 0px 2px 6px 0px #e1e1e1;
			.left{
				font-size: 24rpx;
				.name{
					margin-right: 40rpx;
				}
				.price{
					color:rgb(255, 111, 48) ;
				}
			}
			.time{
				font-size: 24rpx;
				color: rgba(0,0,0,.4);
			}
		}
	}
</style>